class Entity {

    public static var RED = 0xEE0000;
    public static var BLUE = 0x0000EE;

    var pos_x : Int;
    var pos_y : Int;
    var color : Int;

    public function new(x: Int, y: Int, in_color: Int) {
        pos_x = x;
        pos_y = y;
        color = in_color;
    }

    public function render(x: Int, y: Int) {
        var x = pos_x + x;
        var y = pos_y + y;
        var w = 20;
        var h = 20;
        var mc: flash.display.MovieClip = flash.Lib.current;
	    mc.graphics.beginFill(color);
	    mc.graphics.moveTo(x-w,y-h);
	    mc.graphics.lineTo(x+w,y-h);
	    mc.graphics.lineTo(x+w,y+h);
	    mc.graphics.lineTo(x-w,y+h);
	    mc.graphics.endFill();
    }

}

